package com.heiye.kv.biz.repository;

import com.heiye.kv.biz.domain.dataobject.CommentContentDO;
import com.heiye.kv.biz.domain.dataobject.CommentContentPrimaryKey;
import org.springframework.data.cassandra.repository.CassandraRepository;

import java.util.List;
import java.util.UUID;

/**
 * @author: heiye
 * @date: 2025/07/30 下午6:00
 * @version: v1.0.0
 * @description: TODO
 */
public interface CommentContentRepository extends CassandraRepository<CommentContentDO, CommentContentPrimaryKey> {
    /**
     * 批量查询评论内容
     *
     * @param quizId
     * @param yearMonths
     * @param contentIds
     * @return
     */
    List<CommentContentDO> findByPrimaryKeyQuizIdAndPrimaryKeyYearMonthInAndPrimaryKeyContentIdIn(
            Long quizId, List<String> yearMonths, List<UUID> contentIds
    );

    /**
     * 删除评论正文
     *
     * @param quizId
     * @param yearMonth
     * @param contentId
     */
    void deleteByPrimaryKeyQuizIdAndPrimaryKeyYearMonthAndPrimaryKeyContentId(Long quizId, String yearMonth, UUID contentId);


    /**
     * 批量删除评论正文
     *
     * @param quizId
     * @param yearMonths
     * @param contentIds
     */
    void deleteByPrimaryKeyQuizIdAndPrimaryKeyYearMonthInAndPrimaryKeyContentIdIn(
            Long quizId, List<String> yearMonths, List<UUID> contentIds
    );
}
